home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 373 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  559 b 

  1. From: SCMarney@msn.com (Stephen Marney)
  2. Subject: RE: Reading derived-class objects in from a file -- possible?
  3. Date: 4 Jan 96 00:54:19 -0800
  4. References: <4ceho4$re6@lace.colorado.edu>
  5. Message-ID: <00001a81+00008769@msn.com>
  6. Path: news.msn.com!msn.com
  7. Newsgroups: comp.lang.c++
  8. Organization: The Microsoft Network (msn.com)
  9.  
  10. For what it's worth, I've used the code fragment below to Load and 
  11. instantiate an arbitrary class from an archive. (Using Visual C++ 4.0)
  12.  
  13.     CRuntimeClass* prc = CRuntimeClass::Load(ar, &wSchema);
  14.     CObject* pObj = prc->CreateObject();
  15.